<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">     
<head>      
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>易卡会商户管理</title>
    <link rel="icon" href="favicon.ico" type="image/x-icon"/>    
    <#include "../template/include/assign.ftl">
	<#include "../template/include/source.ftl">
	<#include "../template/template_listPage.ftl">    
    <link href="${web_static}/admin/css/list.css" rel="stylesheet" type="text/css"/>
    <style type="text/css">
        .page {
            float: right;
            padding-top: 15px;
            margin-right: 15px;
        }
    </style>   
    <script type="text/javascript">    
    function update(id){
    	window.location.href = "${web_base}/ekhui/operator!toedit.htm?operator.operatorId=" + id ;
    }
    function enableOrDis(id , status){
    	var desc  ;
    	if(status == '1'){
    		desc = '启用' ;
    	}else if(status == '2'){
    		desc = '禁用' ;
    	}
    	$.post(
        		'${web_base}/ekhui/operator!enableOrDis.htm?operator.operatorId=' + id ,
        		{'operator.operatorStatus' : status},
        		function(data){
        			if(data == 'true'){
        				alert(desc+'成功') ;
        			}else{
        				alert(desc+'失败') ;
        			}
        			window.location.reload() ;
        		}
        	);
    }
     </script>   
</head>    
<body class="list"> 
     <div class="body">
     	<div class="listBar">
       		<h1><span class="icon">&nbsp;</span>操作员管理&nbsp;<span class="pageInfo"></span></h1>
    	</div>
    	
    	
    	<@pageList page=(page!) id="listForm" action="${web_base}/ekhui/operator!list.htm" query="operatorQuery" isEmpty=true>
    		<div class="operateBar">
			        <label>查找：</label>
			        操作员名：<input type="text" name="operator.operatorName" value="${operator.operatorName!''}"/>
			  操作员状态：
			  <select name="operator.operatorStatus">
			  	<option value="">请选择</option>
			  	<option value="1"
			  		<#if operator.operatorStatus?? &&operator.operatorStatus=='1'>
			  			selected
			  		</#if>
			  		
			  		
			  	>正常</option>
			  	<option value="0"
			  		<#if  operator.operatorStatus?? &&operator.operatorStatus=='0'>
			  			selected
			  		</#if>
			  	>待审核</option>
			  	<option value="-1"
			  		<#if  operator.operatorStatus?? &&operator.operatorStatus=='-1'>
			  			selected
			  		</#if>
			  	>终止</option>
			  </select>      
			        <input type="submit" id="searchButton" class="searchButton" value=""/>
			  	 	
    		</div>
    		<table class="listTable">
    			<tr>
		            <th>
		                <span class="sort" name="oid_goodsitem">操作员名</span>
		            </th>
		              <th>
		                <span class="sort" name="oid_goodsitem">操作员状态</span>
		            </th>
		            <th>
		                <span class="sort" name="oid_biz">所属商户名称</span>
		            </th>
		            <th>
		                <span class="sort" name="oid_biz">qq</span>
		            </th>
		            <th>
		                <span class="sort" name="oid_biz">邮箱</span>
		            </th>
		            <th>
		                <span class="sort" name="price">创建时间</span>
		            </th>
		            <th width="80">操&nbsp;作
		            <th/>
       		   </tr>
    		   <#if page?? && page.list?? && (page.list?size gt 0)>
    			  <#list page.list as operator>
    				 <tr>
    					 <td>
                   		   ${operator.operatorName!''}
                   		 </td>
    					 <td>						 
    					 	<#if operator.operatorStatus?exists>
    					 		<#if operator.operatorStatus == '1'>
    					 			正常
    					 		</#if>
    					 		<#if operator.operatorStatus == '0'>
    					 			待审核
    					 		</#if>
    					 		<#if operator.operatorStatus == '2'>
    					 			暂停
    					 		</#if>
    					 	</#if>
                  		</td>
                   		<td>
		                   ${operator.traderName!''}
		                </td>
		                <td>
		                   ${operator.qq!''}
		                </td>
		                 <td>
		                   ${operator.email!''}
		                </td>
		                <td>
		                   	<#if operator.createTime?exists>
						   	 ${operator.createTime?string("yyyy-MM-dd HH:mm:ss")}
						   </#if>
                       </td>
                       <td width="80">
                        <#if operator.operatorStatus == '0'>
                       		<span class="spanLink" onclick="tocheck('${(operator.operatorId)!}');" title="审核">[审核]</span>
                        </#if>
                        <#if operator.operatorStatus == '2'>
                        	<span class="spanLink" onclick="enableOrDis('${(operator.operatorId)!}','1');" title="启用">[启用]</span>
                        </#if>
                        <#if operator.operatorStatus == '1'>
                        	<span class="spanLink" onclick="enableOrDis('${(operator.operatorId)!}','2');" title="禁用">[禁用]</span>
                        </#if>
                        <span class="spanLink" onclick="update('${(operator.operatorId)!}');" title="修改">[修改]</span>
                       </td>
    				 </tr>
    		      </#list>
    		   </#if>
    		</table>
	    	<#if page?? && page.list?? && (page.list?size <= 0)>
		        <div class="noRecord">
		         	   没有找到任何记录!
		        </div>
   			</#if>
     	</@pageList>
     </div>
</body>
</html>   
  